package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.BusReciptInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BusSupplierInfoMapper;
import com.ruoyi.system.domain.BusSupplierInfo;
import com.ruoyi.system.service.IBusSupplierInfoService;

/**
 * 供应商信息Service业务层处理
 *
 * @author hst
 * @date 2021-11-24
 */
@Service
public class BusSupplierInfoServiceImpl implements IBusSupplierInfoService
{
    @Autowired
    private BusSupplierInfoMapper busSupplierInfoMapper;

    /**
     * 查询供应商信息
     *
     * @param supplierId 供应商信息主键
     * @return 供应商信息
     */
    @Override
    public BusSupplierInfo selectBusSupplierInfoBySupplierId(Long supplierId)
    {
        return busSupplierInfoMapper.selectBusSupplierInfoBySupplierId(supplierId);
    }

    /**
     * 查询供应商信息列表
     *
     * @param busSupplierInfo 供应商信息
     * @return 供应商信息
     */
    @Override
    public List<BusSupplierInfo> selectBusSupplierInfoList(BusSupplierInfo busSupplierInfo)
    {
        return busSupplierInfoMapper.selectBusSupplierInfoList(busSupplierInfo);
    }

    /**
     * 新增供应商信息
     *
     * @param busSupplierInfo 供应商信息
     * @return 结果
     */
    @Override
    public int insertBusSupplierInfo(BusSupplierInfo busSupplierInfo)
    {
        busSupplierInfo.setCreateTime(DateUtils.getNowDate());
        return busSupplierInfoMapper.insertBusSupplierInfo(busSupplierInfo);
    }

    /**
     * 新增发票信息
     *
     * @param busReciptInfo 发票信息
     * @return 结果
     */
    @Override
    public int insertBusReciptInfo(BusReciptInfo busReciptInfo)
    {
        return busSupplierInfoMapper.insertBusReciptInfo(busReciptInfo);
    }

    /**
     * 修改供应商信息
     *
     * @param busSupplierInfo 供应商信息
     * @return 结果
     */
    @Override
    public int updateBusSupplierInfo(BusSupplierInfo busSupplierInfo)
    {
        busSupplierInfo.setUpdateTime(DateUtils.getNowDate());
        return busSupplierInfoMapper.updateBusSupplierInfo(busSupplierInfo);
    }

    /**
     * 新增发票信息
     *
     * @param busReciptInfo 发票信息
     * @return 结果
     */
    @Override
    public int updateBusReciptInfo(BusReciptInfo busReciptInfo)
    {
        return busSupplierInfoMapper.updateBusReciptInfo(busReciptInfo);
    }

    /**
     * 批量删除供应商信息
     *
     * @param supplierIds 需要删除的供应商信息主键
     * @return 结果
     */
    @Override
    public int deleteBusSupplierInfoBySupplierIds(Long[] supplierIds)
    {
        return busSupplierInfoMapper.deleteBusSupplierInfoBySupplierIds(supplierIds);
    }

    /**
     * 删除供应商信息信息
     *
     * @param supplierId 供应商信息主键
     * @return 结果
     */
    @Override
    public int deleteBusSupplierInfoBySupplierId(Long supplierId)
    {
        return busSupplierInfoMapper.deleteBusSupplierInfoBySupplierId(supplierId);
    }
}
